//
//  ChargeDetailCell.m
//  ImGuider
//
//  Created by 李陆涛 on 2018/1/3.
//  Copyright © 2018年 imguider. All rights reserved.
//

#import "ChargeDetailCell.h"

@interface ChargeDetailCell ()
@property (weak, nonatomic) IBOutlet UILabel *eventLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *moenyLabel;

@end
@implementation ChargeDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(ExpenseModel *)model {
    
    _model = model;
    
    self.eventLabel.text = model.buytype;
    
    if ([model.direction isEqualToString:@"out"]) {
        
        self.moenyLabel.text = [NSString stringWithFormat:@"-%@",model.coin];
        self.moenyLabel.textColor = kSubitleColor;
    } else {
        
        self.moenyLabel.text = [NSString stringWithFormat:@"+%@",model.coin];
        self.moenyLabel.textColor = kThemeRedColor;
    }
    
    self.timeLabel.text = model.consumetime;
}

@end
